package com.chenyun.system.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.chenyun.boot.datasource.model.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 部门表
 *
 * @author Lonni
 * @date 2022-06-10 21:37
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_dept")
@Data
public class SysDept extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -6509070229572925316L;
    private Long deptId;
    private Long parentId;
    private String parentName;
    /**
     * 祖级列表
     */
    private String ancestors;
    private String deptName;
    private Integer orderNum;
    /**
     * 负责人
     */
    private String leader;
    private String phone;

    private String email;
    /**
     * 部门状态（0正常 1停用）
     */
    private Integer status;

    /** 排除编号 */
    private Long excludeId;

    /** 子部门 */
    private List<SysDept> children = new ArrayList<SysDept>();
    @JsonIgnore
    public Long getExcludeId()
    {
        return excludeId;
    }

}
